package com.project_doctor.controller;

import com.project_doctor.pojo.Role;
import com.project_doctor.pojo.Team;
import com.project_doctor.service.RoleService;
import com.project_doctor.service.TeamService;
import com.project_doctor.util.JwtUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@Slf4j
@RestController
@RequestMapping("team")
public class TeamController {
    @Autowired
    private JwtUtil jwtUtil;

    @Autowired
    private RedisTemplate redisTemplate;

    @Autowired
    TeamService teamService;
    //注入Rabbit模板类
    @Autowired
    private RabbitTemplate rabbitTemplate;


    @GetMapping("/getAllTeam")
    public ResponseEntity<?> getAllTeam() {
        List<Team> list = teamService.list();
        return ResponseEntity.ok(list);
    }


}
